using System;
using System.Collections;
using System.Collections.Generic;

using MemberMgr.Data.Base;

namespace MemberMgr.Data.BusinessObjects
{
    public partial class tRole : BusinessBase<uint>
    {
        #region Declarations

		private string _rolename = String.Empty;
		private string _roleattr = String.Empty;
		private string _comment = String.Empty;
		
		
		private IList<tRight> _tRights = new List<tRight>();
		private IList<tUser> _tUsers = new List<tUser>();
		
		#endregion

        #region Constructors

        public tRole() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_rolename);
			sb.Append(_roleattr);
			sb.Append(_comment);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

		public virtual string Rolename
        {
            get { return _rolename; }
			set
			{
				OnRolenameChanging();
				_rolename = value;
				OnRolenameChanged();
			}
        }
		partial void OnRolenameChanging();
		partial void OnRolenameChanged();
		
		public virtual string Roleattr
        {
            get { return _roleattr; }
			set
			{
				OnRoleattrChanging();
				_roleattr = value;
				OnRoleattrChanged();
			}
        }
		partial void OnRoleattrChanging();
		partial void OnRoleattrChanged();
		
		public virtual string Comment
        {
            get { return _comment; }
			set
			{
				OnCommentChanging();
				_comment = value;
				OnCommentChanged();
			}
        }
		partial void OnCommentChanging();
		partial void OnCommentChanged();
		
		public virtual IList<tRight> TRights
        {
            get { return _tRights; }
            set
			{
				OnTRightsChanging();
				_tRights = value;
				OnTRightsChanged();
			}
        }
		partial void OnTRightsChanging();
		partial void OnTRightsChanged();
		
		public virtual IList<tUser> TUsers
        {
            get { return _tUsers; }
            set
			{
				OnTUsersChanging();
				_tUsers = value;
				OnTUsersChanged();
			}
        }
		partial void OnTUsersChanging();
		partial void OnTUsersChanged();
		
        #endregion
    }
}
